home *** CD-ROM | disk | FTP | other *** search
/ The Canadian & World Encyclopedia 1998 / The Canadian & World Encyclopedia 1998 - Disc 2.iso / mac / prime_CD / pb / PROFILE.DIR / 00093_Script_rewind script < prev    next >
Text File  |  1997-07-29  |  2KB  |  55 lines

  1. global over_paused
  2. on mousedown
  3.   set the castnum of sprite the clickon = cast "sub_rewind down"
  4.   updatestage
  5.   set over_paused = FALSE
  6.   set gQTchannel = 26
  7.   set theOriginalRate = the movierate of sprite gQTchannel
  8.   set the movierate of sprite gQTchannel = 0
  9.   --  puppetsprite 3, true
  10.   
  11.   if the shiftDown then set jumpDistance = 1
  12.   else set jumpDistance = 120 -- 2 seconds' worth per click
  13.   
  14.   set themovietime = the movietime of sprite gQTchannel
  15.   set the movietime of sprite gQTchannel = themovietime - jumpDistance
  16.   
  17.   --  set the castnum of sprite 35 = cast "PAUSE.PCT"
  18.   updatestage
  19.   
  20.   if the stillDown then
  21.     set origVolume = the volume of sprite gQTchannel
  22.     set backupFactor = 10 -- backupFactor * 1.1 -- linear speedup
  23.     repeat while the stillDown
  24.       --      set themovietime = the movietime of sprite gQTchannel
  25.       --      set jump = themovietime - integer(backupFactor)
  26.       if the movietime of sprite gQTchannel = 0 then 
  27.         --stay
  28.         --        set the movietime of sprite gQTchannel = 0
  29.         -- updatestage
  30.         exit repeat
  31.       else
  32.         --back up
  33.         set startMT = the movietime of sprite gQTchannel
  34.         set the volume of sprite gQTchannel = origVolume/2
  35.         set the movierate of sprite gQTchannel = 1
  36.         set the movierate of sprite gQTchannel = 0
  37.         set endMT = the movietime of sprite gQTchannel
  38.         set playTime = (endMT - startMT)
  39.         set the movietime of sprite gQTchannel = ¼
  40. the movietime of sprite gQTchannel-(playTime*backupFactor)
  41.         -- jump -- - themovietime  -- kf 12/4/96 integer(backupFactor)
  42.         -- set backupFactor = backupFactor + 1
  43.       end if
  44.       updatestage
  45.     end repeat
  46.     set the volume of sprite gQTchannel = origVolume
  47.   end if
  48.   
  49.   set the movierate of sprite gQTchannel to theOriginalRate
  50.   updatestage
  51. end
  52. on mouseup
  53.   set the castnum of sprite the clickon = cast "sub_rewind"
  54.   updatestage
  55. end